package server.business.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import lombok.Data;

/**
 * 
 * @TableName blood_take
 * @author Galaxy
 */
@TableName(value = "blood_take")
@Data
public class BloodTake implements Serializable {
    /*
     * 编号自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "gmt_create", fill = FieldFill.INSERT) // 创建注解
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE) // 更新注解
    private Date gmtModified;

    /**
     * 输血申请单号
     */
    @TableField(value = "transfusion_number")
    private String transfusionNumber;

    /**
     * 取血单号
     */
    @TableField(value = "bloodtake_number")
    private String bloodTakeNumber;

    /**
     * 取血人工号
     */
    @TableField(value = "bloodtaker_jobnum")
    private String bloodTakerJobnum;

    /**
     * 待取的血液ID
     */
    @TableField(value = "blood_id")
    private String bloodId;

    /**
     * 输血申请类型
     */
    @TableField(value = "transfusion_type")
    private String transfusionType;

    /**
     * 病人身份证号
     */
    @TableField(value = "patient_idcard")
    private String patientIdcard;

    /**
     * 医生工号
     */
    @TableField(value = "doctor_jobnum")
    private String doctorJobnum;

    /**
     * 取血时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "fetch_time")
    private Date fetchTime;

    /**
     * 血液状态（已取血，待取血）
     */
    @TableField(value = "state")
    private String state;

    /**
     * 取血人姓名
     */
    @TableField(value = "blood_taker")
    private String bloodTaker;

    /**
     * 取血人电话
     */
    @TableField(value = "phone_number")
    private String phoneNumber;

    /**
     * 取血人身份证号
     */
    @TableField(value = "idcard")
    private String idcard;

    /**
     * 血液种类
     */
    @TableField(value = "blood_component")
    private String bloodComponent;

    /**
     * 血型
     */
    @TableField(value = "blood_type")
    private String bloodType;

    /**
     * 血量
     */
    @TableField(value = "blood_count")
    private Integer bloodCount;

    /**
     * 1代表已删除，0代表未删除
     */
    @TableLogic
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = -6942738904939258243L;
}